home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / MuManual / Include / libraries / disassembler.i < prev   
Text File  |  1999-10-31  |  3KB  |  64 lines

  1. ;*************************************************************************
  2. ;** disassembler.library                                                **
  3. ;**                                                                     **
  4. ;** a simple system library for disassembling a86K binaries             **
  5. ;**                                                                     **
  6. ;** © 1999 THOR-Software, Thomas Richter                                **
  7. ;** No commercial use, reassembly, modification without prior, written  **
  8. ;** permission of the authors.                                          **
  9. ;** Including this library in any commercial software REQUIRES a        **
  10. ;** written permission and the payment of a small fee.                  **
  11. ;**                                                                     **
  12. ;**---------------------------------------------------------------------**
  13. ;** Definition of the library, and structures                           **
  14. ;**                                    **
  15. ;** $VER: 40.2 (31.10.99) © THOR                                   **
  16. ;*************************************************************************
  17.  
  18.         IFND LIBRARIES_DISASSEMBLER_I
  19.  
  20. LIBRARIES_DISASSEMBLER_I SET 1
  21.  
  22.         IFND EXEC_TYPES_I
  23.         INCLUDE "exec/types.i"
  24.         ENDC ; EXEC_TYPES_I
  25.  
  26.         IFND EXEC_LIBRARIES_I
  27.         INCLUDE "exec/libraries.i"
  28.         ENDC ; EXEC_LIBRARIES_I
  29.  
  30.         ;* There's really nothing in this library base you need to care about *
  31.  
  32.         STRUCTURE    DisassemblerBase,LIB_SIZE
  33.         LABEL        dllib_SIZE
  34.  
  35.  
  36. DISASSEMBLERNAME        MACRO
  37.                         DC.B 'disassembler.library',0
  38.                         ENDM
  39.  
  40. ;* The one and only structure you need to care about. This one is
  41. ;*  passed in to Disassemble() *
  42.  
  43.         STRUCTURE DisData,0
  44.                 APTR  ds_From         ;* base to start disassembly from *
  45.                 APTR  ds_UpTo         ;* where to stop it *
  46.                 APTR  ds_PC           ;* the disassembler prints a "*" here *
  47.                 APTR  ds_PutProc      ;* to avoid casts, this is a void *. *
  48.                 APTR  ds_UserData     ;* passed to the PutProc in a1 and a3 *
  49.                 APTR  ds_UserBase     ;* passed to the PutProc in a4 *
  50.                 UWORD ds_Truncate     ;* limit width of the output *
  51.                 UWORD ds_reserved     ;* this is currently reserved *
  52.         LABEL ds_SIZE
  53.  
  54. ;* PutProc is actually a function pointer, but due to different compilers
  55. ;* and conventions defined here as a void *. It is called with the
  56. ;* character to print in d0, the user data in a1 and a3 and the user
  57. ;* base in a4. This is most useful for C code.
  58.  
  59. ;* The library functions are interrupt-callable, provided your PutProc
  60. ;* is.
  61.  
  62.         ENDC    ;LIBRARIES_DISASSEMBLER_I
  63.  
  64.